From: Keir Fraser Date: Thu, 20 Dec 2007 10:43:06 +0000 (+0000) Subject: hvm: Fix TPMD and QEMU connection X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14445^2~107 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=b8af4123ed9d2c39b4706724778c47b18b7e3e8f;p=xen.git hvm: Fix TPMD and QEMU connection In HVM domain, MA_Transmit function in tcgbios sometimes become an error (TCG_NO_RESPONSE). The cause of the error is not to make connection of QEMU and TPMD instance within a timeout of MA_Transmit function. Before the MA_Transmit function was called, the attached patch corrected so that connection of QEMU and TPMD might be completed. Signed-off-by: Kouichi YASAKI --- diff --git a/tools/ioemu/hw/tpm_tis.c b/tools/ioemu/hw/tpm_tis.c index c40a33e677..3c67921822 100644 --- a/tools/ioemu/hw/tpm_tis.c +++ b/tools/ioemu/hw/tpm_tis.c @@ -904,6 +904,11 @@ void tpm_tis_init(SetIRQFunc *set_irq, void *opaque, int irq) memset(s->buffer.buf,0,sizeof(s->buffer.buf)); register_savevm("tpm-tis", 0, 1, tpm_save, tpm_load, s); + + for (c = 0; !IS_COMM_WITH_VTPM(s) && (c < 5); c++) { + open_vtpm_channel(s); + sleep(1); + } } /****************************************************************************/